import { adminComments, createcommentData } from "@/type/comment";
import request from "@/utils/request";

//管理员获取评论列表
export const admingetComment = (data?: adminComments) => {
  return request({
    url: "/admin/comments",
    method: "get",
    params: data,
  });
};

//管理员创建评论
export const admincreateComment = (data: createcommentData) => {
  return request({
    url: "/admin/comments",
    method: "post",
    data,
  });
};

//管理员删除评论
export const admindeleteComment = (id: number) => {
  return request({
    url: `/admin/comments/${id}`,
    method: "delete",
  });
};
